local airbus
env.setErrorMessageBoxEnabled(true)

if UNIT:FindByName("Airbus") then
    airbus = UNIT:FindByName("Airbus")
else
    return
end

local clientSet = SET_CLIENT:New():FilterCoalitions("red"):FilterStart()

clientSet:ForEachClient( function ( client )
    -- if client:GetPlayer() then
        trigger.action.outText("test!", 10, true, 0)
        local unit
        if client:GetClientGroupUnit() ~= nil then
            unit = client:GetClientGroupUnit()
            if airbus:OtherUnitInRadius(unit, 500) then -- if player in airbus range
                trigger.action.outText("u are in !", 10, true, 0)
            else -- player out of range
                trigger.action.outText("too far!", 10, true, 0)
            end
        end
    
end)